using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace TimeLogger
{
    public class DataCollections
    {
        private string _name;        
        private string _message;
        private DateTime _date;
        private TimeSpan _timespan;
        private double _time;        
        private int _projectID;
        
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public DateTime Date
        {
            get { return _date; }
            set { _date = value; }
        }

        public TimeSpan Timespan
        {
            get { return _timespan; }
            set { _timespan = value; }
        }

        [XmlElement("Interval")]
        public string IntervalString
        {
            get { return _timespan.ToString(); }
            set { _timespan = TimeSpan.Parse(value); }
        }

        public string Message
        {
            get { return _message; }
            set { _message = value; }
        }       

        public int ProjectID
        {
            get { return _projectID; }
            set { _projectID = value; }
        }

        public double Time
        {
            get { return _time; }
            set { _time = value; }
        }
    }
}
